package utils;
/**
 * 
 * @author Savva
 *
 */
public enum FileType {
	FILE_TYPE(1), CATALOGUE_TYPE(2);
	
	private final int value;
	
	private FileType(int b) {
		value = b;
	}

	public int getValue() {
		return value;
	}
	
	 public static FileType getType(int a) {
		 for(FileType type: values()) {
			 if(type.getValue() == a)
				 return type;
		 }
		 return null;
	 }
	 
	 @Override
	public String toString() {
		 if(value == 1)
			 	return "file";
		 if(value == 2)
			 return "catalogue";
		 return "wtf"; 
	}
}
